Fully Qualified Name: | Laminas\Mail\Transport\Smtp |
Implements: | TransportInterface |
SMTP connection object
Loads an instance of Laminas\Mail\Protocol\Smtp and forwards smtp transactions
Name | Description | Defined By |
---|---|---|
__construct() | Constructor. | Smtp |
__destruct() | Class destructor to ensure all open connections are closed | Smtp |
disconnect() | Disconnect the connection protocol instance | Smtp |
getAutoDisconnect() | Get the automatic disconnection value | Smtp |
getConnection() | Gets the connection protocol instance | Smtp |
getEnvelope() | Get envelope | Smtp |
getOptions() | Get options | Smtp |
getPluginManager() | Get plugin manager for loading SMTP protocol connection | Smtp |
plugin() | Return an SMTP connection | Smtp |
send() | Send an email via the SMTP connection protocol | Smtp |
setAutoDisconnect() | Set the automatic disconnection when destruct | Smtp |
setConnection() | Sets the connection protocol instance | Smtp |
setEnvelope() | Set options | Smtp |
setOptions() | Set options | Smtp |
setPluginManager() | Set plugin manager for obtaining SMTP protocol connection | Smtp |
Constructor.
Parameter Name | Type | Description |
---|---|---|
$options | \SmtpOptions | Optional |
Returns:
Class destructor to ensure all open connections are closed
Returns:
Disconnect the connection protocol instance
Returns: void
Get the automatic disconnection value
Returns: bool
Gets the connection protocol instance
Returns: \Protocol\Smtp
Get envelope
Returns: \Envelope|null
Get options
Returns: \SmtpOptions
Get plugin manager for loading SMTP protocol connection
Returns: \Protocol\SmtpPluginManager
Return an SMTP connection
Parameter Name | Type | Description |
---|---|---|
$name | string | |
$options | array|null |
Returns: \Protocol\Smtp
Send an email via the SMTP connection protocol
The connection via the protocol adapter is made just-in-time to allow a developer to add a custom adapter if required before mail is sent.
Parameter Name | Type | Description |
---|---|---|
$message | \Message |
Returns:
Set the automatic disconnection when destruct
Parameter Name | Type | Description |
---|---|---|
$flag | bool |
Returns: \Smtp
Sets the connection protocol instance
Parameter Name | Type | Description |
---|---|---|
$connection | \Protocol\AbstractProtocol |
Returns:
Set options
Parameter Name | Type | Description |
---|---|---|
$envelope | \Envelope |
Returns:
Set options
Parameter Name | Type | Description |
---|---|---|
$options | \SmtpOptions |
Returns: \Smtp
Set plugin manager for obtaining SMTP protocol connection
Parameter Name | Type | Description |
---|---|---|
$plugins | \Protocol\SmtpPluginManager |
Returns: \Smtp